<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>v-if指令讲解</title>
		<script src="js/vue.js"></script>
	</head>
	<body>
		<div id="app">
			<img src="img/bg1.jpg" v-if="isShow"  style="width: 200px;height: 200px;"/>
			<button @click="changeImg">切换图片显示</button>		
		</div>
		<script>
		var app=new Vue({
			el:"#app",
			data:{
				isShow:true
			},
			methods:{
				changeImg:function(){
					this.isShow=!this.isShow
				}
				
			}
			
			
			
		})
		
		
		
		</script>
	</body>
</html>
